﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Godot.core.math
{
    public class Rect2
    {
        public Vector2 pos;
        public Vector2 size;

        public static readonly Rect2 empty = new Rect2();

        public Rect2()
        {
            pos = new Vector2();
            size = new Vector2();
        }

        public Rect2(Vector2 p_pos, Vector2 p_size)
        {
            // TODO: Complete member initialization
           pos = p_pos;
           size = p_size;
        }

        public static bool operator == (Rect2 p_r1, Rect2 p_r2)
        {
            return (p_r1.pos == p_r2.pos) && (p_r1.size == p_r2.size);
        }

        public static bool operator !=(Rect2 p_r1, Rect2 p_r2)
        {
            return !(p_r1 == p_r2);
        }

        public override bool Equals(object obj)
        {
            if (obj is Rect2)
            {
                return ((Rect2)obj) == this;
            }
            return base.Equals(obj);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}
